<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<table border="1">
<tr>
	<th>시간</th>
	<th>리그</th>
	<th>사이트</th>
	<th>팀</th>
	<th>게임방법</th>
	<th>승</th>
	<th>무</th>
	<th>패</th>
</tr>
<c:forEach items="${gameList}" var="game">
<tr>
	<td><fmt:formatDate value="${game.gameDate}" pattern="MM월dd일 HH시mm분" /></td>
	<td>${game.league}</td>
	<td>${game.site}</td>
	<td>${game.homeTeam} vs ${game.awayTeam}</td>
	<td>${game.gameType}</td>
	<td><fmt:formatNumber value="${game.homeRate}" maxFractionDigits="2" minFractionDigits="2" /></td>
	<c:choose>
	<c:when test="${game.gameType == '승무패'}">
	<td><fmt:formatNumber value="${game.drawRate}" maxFractionDigits="2" minFractionDigits="2" /></td>
	</c:when>
	<c:otherwise>
	<td style="color:#f60;"><fmt:formatNumber value="${game.handy}" maxFractionDigits="2" minFractionDigits="2" /></td>
	</c:otherwise>
	</c:choose>
	<td><fmt:formatNumber value="${game.awayRate}" maxFractionDigits="2" minFractionDigits="2" /></td>
</tr>
</c:forEach>
</table>


</body>
</html>